<?php
/*	Конфиг для jApi */
$conf=array(
	'incPath'=>'{docRoot}/lib/',
	'lang'=>'ru',
	'dbConf'=>array(
		'host' => 'localhost',
		'user' => 'root',
		'password' => '',
		'dbname' => 'sib_geo',
		'set_names' => 'utf8',
	),
	'router'=>array(
	  'defOptRules'=>'(token)=(tn(X|\w{32}))',
	  'routes'=>array(
			  array('get','/', 'GeoModel/def'),
				array('get','/countries/?', 'GeoModel/getCountries', '(page)=(all|\d+)'),
				array('get','/country/?([A-Z]{2})?/?', 'GeoModel/getCountry'),
				array('get','/regions/([A-Z]{2})?/?', 'GeoModel/getRegions', '(page)=(all|\d+)'),
				array('get','/region/(rg\w{32})?/?', 'GeoModel/getRegion'),
				array('get','/cities/([A-Z]{2,2}|rg\w{32})?/?','GeoModel/getCities', '(page)=(all|\d+)'),
				array('get','/city/(ct\w{32})?/?','GeoModel/getCity'),
				array('get','/urbans/(\w{34})?/?', 'GeoModel/getUrbans' , '(page)=(all|\d+)'),
				array('get','/urbanareas/(\w{34})?/?', 'GeoModel/getUrbans', '(page)=(all|\d+)'),
				array('get','/urban/?(ub\w{32})?/?', 'GeoModel/getUrban'),
				array('get','/urbanarea/?(ub\w{32})?/?', 'GeoModel/getUrban'),
				array('get','/points/([A-Z]{2,2}|\w{34})/?', 'GeoModel/getPoints' , '(page)=(all|\d+)'),
				array('get','/points/(\d+\.\d+)/(\d+\.\d+)/?(\d*)/?', 'GeoModel/getPointsNear', '(page)=(all|\d+)'),// /pointsNear/lat lng/radius
				array('get','/point/?(pt\w{32})?/?', 'GeoModel/getPoint'),//point/id
				array('get','/networks/(\w+)?/?', 'GeoModel/getNetworks' , '(page)=(all|\d+)'),
			  array('get','/networks/(\d+\.\d+)/(\d+\.\d+)/?(\d*)/?', 'GeoModel/getNetworksNear', '(page)=(all|\d+)'),// /networksNear/lat lng/radius
				array('get','/network/?(nt\w{32})?/?', 'GeoModel/getNetwork'),
				array('get','/network/(\w+)/?', 'GeoModel/findNetwork'),

			  array('post','/country', 'GeoModelEdit/postCountry'),
			  array('post','/region', 'GeoModelEdit/postRegion'),
			  array('post','/city', 'GeoModelEdit/postCity'),
			  array('post','/urbanarea', 'GeoModelEdit/postUrban'),
			  array('post','/addr', 'GeoModelEdit/postAddr'),
			  array('post','/network', 'GeoModelEdit/postNet'),
			  array('post','/point', 'GeoModelEdit/postPoint'),
			  array('post','/pointManual', 'GeoModelEdit/postPointManual'),
			  array('post','/mergeNet', 'GeoModelEdit/mergeNet'),
		),
	),
);
return $conf;
?>